com.epiphan.vga2usb
Class KVM.Key

Object
  extended bycom.epiphan.vga2usb.Enum
      extended bycom.epiphan.vga2usb.Enum.Int
          extended bycom.epiphan.vga2usb.KVM.Key
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
KVM.Key.E0
Enclosing class:
KVM

public static class KVM.Key
extends com.epiphan.vga2usb.Enum.Int

Standard PS/2 scancode descriptor. It represents a single byte PRESS sequence, and a two byte RELEASE sequence that starts with 0xF0, for example {0x5A} and {0xF0,0x5A}.

Since:
3.20.15
See Also:
http://www.computer-engineering.org/ps2keyboard

Nested Class Summary
static class KVM.Key.E0
          Extended (E0-based) PS/2 scancode descriptor.
 
Constructor Summary
KVM.Key(int vk, String text, int code)
          Creates a standard scancode descriptor.
 
Method Summary
 int compareTo(int key)
          Compares id of this object with the specified key for order.
 int compareTo(Object obj)
          Compares this object with the specified object for order.
 String getDescription()
          Returns the description of this object.
 int getValue()
          Gets the integer value associated with this object.
 int hashCode()
          Returns the hashcode for this object.
protected static int search(java.util.List list, int key)
          Searches the list for the specified enum object using the binary search algorithm.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KVM.Key

public KVM.Key(int vk,
               String text,
               int code)
Creates a standard scancode descriptor. It represents a single byte PRESS sequence, and a two byte RELEASE sequence that starts with 0xF0. For example, if the code argument equals 0x5A, then the PRESS sequence will be {0x5A} and the RELEASE sequence will be {0xF0,0x5A}.

Parameters:
vk - Java virtual key code.
text - key description.
code - the last byte of the scancode sequence.
See Also:
KeyEvent
Method Detail

compareTo

public int compareTo(int key)
Compares id of this object with the specified key for order. Returns a negative integer, zero, or a positive integer as id of this object is less than, equal to, or greater than the specified key.

Parameters:
key - the key to be compared.
Returns:
a negative integer, zero, or a positive integer as id of this object is less than, equal to, or greater than the specified key.
Throws:
ClassCastException - if the specified object's type prevents it from being compared to this Object.
See Also:
Comparable

compareTo

public int compareTo(Object obj)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface Comparable
Parameters:
obj - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object's type prevents it from being compared to this Object.
See Also:
Comparable

getValue

public final int getValue()
Gets the integer value associated with this object.

Returns:
The integer value that identifies this object

hashCode

public final int hashCode()
Returns the hashcode for this object.

Returns:
The hashcode for this object.

search

protected static int search(java.util.List list,
                            int key)
Searches the list for the specified enum object using the binary search algorithm. The list must be sorted.

Parameters:
list - the list to search
key - the key to search for
Returns:
index of the enum object, if it is contained in the list; otherwise, (-(insertion point) - 1).

getDescription

public final String getDescription()
Returns the description of this object.

Returns:
The description of this object.

toString

public final String toString()
Returns a string representation of this object. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Returns:
A string representation of this object.


Copyright © 2008-2012 Epiphan Systems Inc. All rights reserved.